﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeCamp.Models.Sessions.SessionsDetailsViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
  <%= Html.Encode( Model.EventDisplayName ) %> | Session Details for <%= Html.Encode(Model.Title) %>
</asp:Content>

<asp:Content ID="EventTags" ContentPlaceHolderID="EventTagsContent" runat="server">
  <div id="eventTagsContainer" class="widget rounded-10">
    <h3>Tags</h3>
    <% Html.RenderPartial( "PartialViews/EventTags", Model.EventTags ); %>
  </div>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

  <h2 class="title"><%= Html.Encode( Model.Title ) %></h2>
  <h3>Session Details</h3>

  <% Html.RenderPartial( "PartialViews/SessionPresenters", Model.SessionPresenters ); %>
  <% if ( Model.SessionScheduleInfo != null )
     { Html.RenderPartial( "PartialViews/SessionScheduleInfo", Model.SessionScheduleInfo ); } %>
  
  <% Html.RenderPartial( "PartialViews/SessionTags", Model.SessionTags ); %>
  
  <% if ( !string.IsNullOrEmpty( Model.SessionMaterialsUrl ) )
     { %>
        <p>
          <b>Download</b> the <a href="<%= Html.Encode( Model.SessionMaterialsUrl ) %>">session materials</a>.
        </p>
  <% } %>

  <% if ( Model.IsUserAuthorizedToEdit )
     { %>
        <p>
          <%= Html.ActionLink( "Edit", "Edit", new { id = Model.SessionId }, null ) %>
        </p>
  <% } %>

   <p>
    <%= Html.Encode(Model.Description) %>
  </p>

  <div id="editSessionTags" style="background-color: Silver; padding: 10px;">
    <div>
      <% using ( Html.BeginForm( "DetailsSetTags", "Sessions" ) )
         {
           Html.RenderPartial( "PartialViews/EditSessionTags", 
              new CodeCamp.Models.Sessions.EditSessionTags
                { SessionId = Model.SessionId, SessionTags = Model.SessionTags, EventTags = Model.EventTags } );
         } %>
    </div>

    <div>
      <% using ( Html.BeginForm( "DetailsAddTag", "Sessions" ) )
         {
           Html.RenderPartial( "PartialViews/AddSessionTag",
             new CodeCamp.Models.Sessions.AddSessionTag
              { SessionId = Model.SessionId } );
         } %>
    </div>
  </div>

</asp:Content>
